package kgame5.kmath {

/**
 * @author kk
 * 三角函数，快速的
 */
public class TriMath {
	////////////////////////////////
	public static function sin(angle:int):Number{
		angle=MathDG.C360(angle);
		return SIN[angle];
	}
	
	public static function cos(angle:int):Number{
		angle=MathDG.C360(angle);
		return COS[angle];
	}
	
	private static var SIN:Array=[
		0,

0.0174,

0.0348,

0.0523,

0.0697,

0.0871,

0.1045,

0.1218,

0.1391,

0.1564,

0.1736,

0.1908,

0.2079,

0.2249,

0.2419,

0.2588,

0.2756,

0.2923,

0.309,

0.3255,

0.342,

0.3583,

0.3746,

0.3907,

0.4067,

0.4226,

0.4383,

0.4539,

0.4694,

0.4848,

0.4999,

0.515,

0.5299,

0.5446,

0.5591,

0.5735,

0.5877,

0.6018,

0.6156,

0.6293,

0.6427,

0.656,

0.6691,

0.6819,

0.6946,

0.7071,

0.7193,

0.7313,

0.7431,

0.7547,

0.766,

0.7771,

0.788,

0.7986,

0.809,

0.8191,

0.829,

0.8386,

0.848,

0.8571,

0.866,

0.8746,

0.8829,

0.891,

0.8987,

0.9063,

0.9135,

0.9205,

0.9271,

0.9335,

0.9396,

0.9455,

0.951,

0.9563,

0.9612,

0.9659,

0.9702,

0.9743,

0.9781,

0.9816,

0.9848,

0.9876,

0.9902,

0.9925,

0.9945,

0.9961,

0.9975,

0.9986,

0.9993,

0.9998,

1,

0.9998,

0.9993,

0.9986,

0.9975,

0.9961,

0.9945,

0.9925,

0.9902,

0.9876,

0.9848,

0.9816,

0.9781,

0.9743,

0.9702,

0.9659,

0.9612,

0.9563,

0.951,

0.9455,

0.9396,

0.9335,

0.9271,

0.9205,

0.9135,

0.9063,

0.8987,

0.891,

0.8829,

0.8746,

0.866,

0.8571,

0.848,

0.8386,

0.829,

0.8191,

0.809,

0.7986,

0.788,

0.7771,

0.766,

0.7547,

0.7431,

0.7313,

0.7193,

0.7071,

0.6946,

0.6819,

0.6691,

0.656,

0.6427,

0.6293,

0.6156,

0.6018,

0.5877,

0.5735,

0.5591,

0.5446,

0.5299,

0.515,

0.4999,

0.4848,

0.4694,

0.4539,

0.4383,

0.4226,

0.4067,

0.3907,

0.3746,

0.3583,

0.342,

0.3255,

0.309,

0.2923,

0.2756,

0.2588,

0.2419,

0.2249,

0.2079,

0.1908,

0.1736,

0.1564,

0.1391,

0.1218,

0.1045,

0.0871,

0.0697,

0.0523,

0.0348,

0.0174,

0,

-0.0174,

-0.0348,

-0.0523,

-0.0697,

-0.0871,

-0.1045,

-0.1218,

-0.1391,

-0.1564,

-0.1736,

-0.1908,

-0.2079,

-0.2249,

-0.2419,

-0.2588,

-0.2756,

-0.2923,

-0.309,

-0.3255,

-0.342,

-0.3583,

-0.3746,

-0.3907,

-0.4067,

-0.4226,

-0.4383,

-0.4539,

-0.4694,

-0.4848,

-0.5,

-0.515,

-0.5299,

-0.5446,

-0.5591,

-0.5735,

-0.5877,

-0.6018,

-0.6156,

-0.6293,

-0.6427,

-0.656,

-0.6691,

-0.6819,

-0.6946,

-0.7071,

-0.7193,

-0.7313,

-0.7431,

-0.7547,

-0.766,

-0.7771,

-0.788,

-0.7986,

-0.809,

-0.8191,

-0.829,

-0.8386,

-0.848,

-0.8571,

-0.866,

-0.8746,

-0.8829,

-0.891,

-0.8987,

-0.9063,

-0.9135,

-0.9205,

-0.9271,

-0.9335,

-0.9396,

-0.9455,

-0.951,

-0.9563,

-0.9612,

-0.9659,

-0.9702,

-0.9743,

-0.9781,

-0.9816,

-0.9848,

-0.9876,

-0.9902,

-0.9925,

-0.9945,

-0.9961,

-0.9975,

-0.9986,

-0.9993,

-0.9998,

-1,

-0.9998,

-0.9993,

-0.9986,

-0.9975,

-0.9961,

-0.9945,

-0.9925,

-0.9902,

-0.9876,

-0.9848,

-0.9816,

-0.9781,

-0.9743,

-0.9702,

-0.9659,

-0.9612,

-0.9563,

-0.951,

-0.9455,

-0.9396,

-0.9335,

-0.9271,

-0.9205,

-0.9135,

-0.9063,

-0.8987,

-0.891,

-0.8829,

-0.8746,

-0.866,

-0.8571,

-0.848,

-0.8386,

-0.829,

-0.8191,

-0.809,

-0.7986,

-0.788,

-0.7771,

-0.766,

-0.7547,

-0.7431,

-0.7313,

-0.7193,

-0.7071,

-0.6946,

-0.6819,

-0.6691,

-0.656,

-0.6427,

-0.6293,

-0.6156,

-0.6018,

-0.5877,

-0.5735,

-0.5591,

-0.5446,

-0.5299,

-0.515,

-0.5,

-0.4848,

-0.4694,

-0.4539,

-0.4383,

-0.4226,

-0.4067,

-0.3907,

-0.3746,

-0.3583,

-0.342,

-0.3255,

-0.309,

-0.2923,

-0.2756,

-0.2588,

-0.2419,

-0.2249,

-0.2079,

-0.1908,

-0.1736,

-0.1564,

-0.1391,

-0.1218,

-0.1045,

-0.0871,

-0.0697,

-0.0523,

-0.0348,

-0.0174


	];
	
	private static var COS:Array=[
		1,

0.9998,

0.9993,

0.9986,

0.9975,

0.9961,

0.9945,

0.9925,

0.9902,

0.9876,

0.9848,

0.9816,

0.9781,

0.9743,

0.9702,

0.9659,

0.9612,

0.9563,

0.951,

0.9455,

0.9396,

0.9335,

0.9271,

0.9205,

0.9135,

0.9063,

0.8987,

0.891,

0.8829,

0.8746,

0.866,

0.8571,

0.848,

0.8386,

0.829,

0.8191,

0.809,

0.7986,

0.788,

0.7771,

0.766,

0.7547,

0.7431,

0.7313,

0.7193,

0.7071,

0.6946,

0.6819,

0.6691,

0.656,

0.6427,

0.6293,

0.6156,

0.6018,

0.5877,

0.5735,

0.5591,

0.5446,

0.5299,

0.515,

0.5,

0.4848,

0.4694,

0.4539,

0.4383,

0.4226,

0.4067,

0.3907,

0.3746,

0.3583,

0.342,

0.3255,

0.309,

0.2923,

0.2756,

0.2588,

0.2419,

0.2249,

0.2079,

0.1908,

0.1736,

0.1564,

0.1391,

0.1218,

0.1045,

0.0871,

0.0697,

0.0523,

0.0348,

0.0174,

0,

-0.0174,

-0.0348,

-0.0523,

-0.0697,

-0.0871,

-0.1045,

-0.1218,

-0.1391,

-0.1564,

-0.1736,

-0.1908,

-0.2079,

-0.2249,

-0.2419,

-0.2588,

-0.2756,

-0.2923,

-0.309,

-0.3255,

-0.342,

-0.3583,

-0.3746,

-0.3907,

-0.4067,

-0.4226,

-0.4383,

-0.4539,

-0.4694,

-0.4848,

-0.4999,

-0.515,

-0.5299,

-0.5446,

-0.5591,

-0.5735,

-0.5877,

-0.6018,

-0.6156,

-0.6293,

-0.6427,

-0.656,

-0.6691,

-0.6819,

-0.6946,

-0.7071,

-0.7193,

-0.7313,

-0.7431,

-0.7547,

-0.766,

-0.7771,

-0.788,

-0.7986,

-0.809,

-0.8191,

-0.829,

-0.8386,

-0.848,

-0.8571,

-0.866,

-0.8746,

-0.8829,

-0.891,

-0.8987,

-0.9063,

-0.9135,

-0.9205,

-0.9271,

-0.9335,

-0.9396,

-0.9455,

-0.951,

-0.9563,

-0.9612,

-0.9659,

-0.9702,

-0.9743,

-0.9781,

-0.9816,

-0.9848,

-0.9876,

-0.9902,

-0.9925,

-0.9945,

-0.9961,

-0.9975,

-0.9986,

-0.9993,

-0.9998,

-1,

-0.9998,

-0.9993,

-0.9986,

-0.9975,

-0.9961,

-0.9945,

-0.9925,

-0.9902,

-0.9876,

-0.9848,

-0.9816,

-0.9781,

-0.9743,

-0.9702,

-0.9659,

-0.9612,

-0.9563,

-0.951,

-0.9455,

-0.9396,

-0.9335,

-0.9271,

-0.9205,

-0.9135,

-0.9063,

-0.8987,

-0.891,

-0.8829,

-0.8746,

-0.866,

-0.8571,

-0.848,

-0.8386,

-0.829,

-0.8191,

-0.809,

-0.7986,

-0.788,

-0.7771,

-0.766,

-0.7547,

-0.7431,

-0.7313,

-0.7193,

-0.7071,

-0.6946,

-0.6819,

-0.6691,

-0.656,

-0.6427,

-0.6293,

-0.6156,

-0.6018,

-0.5877,

-0.5735,

-0.5591,

-0.5446,

-0.5299,

-0.515,

-0.5,

-0.4848,

-0.4694,

-0.4539,

-0.4383,

-0.4226,

-0.4067,

-0.3907,

-0.3746,

-0.3583,

-0.342,

-0.3255,

-0.309,

-0.2923,

-0.2756,

-0.2588,

-0.2419,

-0.2249,

-0.2079,

-0.1908,

-0.1736,

-0.1564,

-0.1391,

-0.1218,

-0.1045,

-0.0871,

-0.0697,

-0.0523,

-0.0348,

-0.0174,

0,

0.0174,

0.0348,

0.0523,

0.0697,

0.0871,

0.1045,

0.1218,

0.1391,

0.1564,

0.1736,

0.1908,

0.2079,

0.2249,

0.2419,

0.2588,

0.2756,

0.2923,

0.309,

0.3255,

0.342,

0.3583,

0.3746,

0.3907,

0.4067,

0.4226,

0.4383,

0.4539,

0.4694,

0.4848,

0.5,

0.515,

0.5299,

0.5446,

0.5591,

0.5735,

0.5877,

0.6018,

0.6156,

0.6293,

0.6427,

0.656,

0.6691,

0.6819,

0.6946,

0.7071,

0.7193,

0.7313,

0.7431,

0.7547,

0.766,

0.7771,

0.788,

0.7986,

0.809,

0.8191,

0.829,

0.8386,

0.848,

0.8571,

0.866,

0.8746,

0.8829,

0.891,

0.8987,

0.9063,

0.9135,

0.9205,

0.9271,

0.9335,

0.9396,

0.9455,

0.951,

0.9563,

0.9612,

0.9659,

0.9702,

0.9743,

0.9781,

0.9816,

0.9848,

0.9876,

0.9902,

0.9925,

0.9945,

0.9961,

0.9975,

0.9986,

0.9993,

0.9998

		

	];
	
	/////////////////////////////////
}
}
